import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.classic.Session;

import de.hdu.mfz.dao.RouteDAO;
import de.hdu.mfz.dao.UserDAO;
import de.hdu.mfz.model.Mitfahrt;
import de.hdu.mfz.model.Route;
import de.hdu.mfz.model.User;

public class UserDAOTestConsole {

	/**
	 * @param args
	 */

	public static void main(String[] args) {
				
		UserDAO userDao = new UserDAO();
		userDao.create("testvorn", "testnachna");
		
	}}
//		
//		Route r = new Route();
//		r.setRouteId(1);
//				
//
//		User u = userDao.findByRoute(r);
//		System.out.println("UserId:" + u.getUserId() + 
//				"Username:" + u.getUsername());
//	
//		
//		Route r = new Route();
//		r.setFahrer(u);
//		r.setPlaetze(6);
		
//		

		
		
//		List<User> userbyusername = userDao.findByUsername("susi sonnenschein");
//		List<User> userbyroute = userDao.findByRoute(r);

//		System.out.println(userbyusername.size()+ "User: " + userbyusername.toString());
//		System.out.println(userbyroute.toString());
		
//		session.save(u);
//		session.getTransaction().commit();
//		
//	}
//
//}

// public static void main(String[] args) {
// SessionFactory sf = new
// AnnotationConfiguration().configure().buildSessionFactory();
// Session session = sf.getCurrentSession();
// Transaction t = session.beginTransaction();
//

// User u = new User();
// u.setUsername("teffi-deluxe");
// u.setVorname("Steffi");
// u.setNachname("Schmitt");
// u.setPasswort("Passwort");
// u.setEmail("emailadresse@email.de");

//
//
// User u1 = new User("teffi","Steffi","schmitt","email","tel","passwort",true);
//
//
// session.save(u1);
// t.commit();
//
//
// }
// }